package com.it.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.UserFriendService;
import com.it.park.dao.UserFriendMapper;
import com.it.park.model.UserFriend;

@Service("userFriendService")
public class UserFriendServiceImpl extends BaseServiceImpl<UserFriend> implements UserFriendService {
	
	@Autowired
	private  UserFriendMapper  userFriendMapper;

	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return userFriendMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(UserFriend record) {
		return userFriendMapper.insertSelective(record)==1;
	}
	@Override
	public UserFriend selectByPrimaryKey(Integer id) {
		return userFriendMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(UserFriend record) {
		return userFriendMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(UserFriend record) {
		return userFriendMapper.updateByPrimaryKey(record)==1;
	}
	@Override
	public boolean insert(UserFriend record) {
		return userFriendMapper.insert(record)==1;
	}
	@Override
	public List<UserFriend> selectAllFriends(Map<String,Object> map) {
		return userFriendMapper.selectAllFriends(map);
	}
	@Override
	public boolean cancelAttention(Map<String, Object> map) {
		return userFriendMapper.cancelAttention(map)==1;
	}
	@Override
	public UserFriend selectHasExists(UserFriend userFriend) {
		return userFriendMapper.selectHasExists(userFriend);
	}
	

}
